@extends('admin.layout.layout', ['row' => @$page])

@section('contain')
    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                <x-portlet-breadcrumb :page="$page"></x-portlet-breadcrumb>
            </div>
            <div class="actions"></div>
        </div>

        <form action="/{{ request()->path() }}/../" method="post" onsubmit="return checkVal(this)">
            @csrf
            <input type="text" name="_previous_" value="{{ request()->header('referer') }}" hidden>
            <div class="form-item form-s1">
                <div class="form-label" required="">{{ ts('rollnumber') }}</div>
                <div class="form-input">
                    <input type="text" name="roll_number" value="{{ $data->roll_number ?: old('roll_number') }}" class="form-control">
                </div>
            </div>
            {{--<div class="form-item form-s1">
                <div class="form-label" required="">{{ ts('producttype') }}</div>
                <div class="form-input">
                    <select name="product_type_id" class="form-control">
                        @foreach(\App\Models\ProductTypes::get('id') as $v)
                            <option value="{{ $v->id }}" {{ ($data->product_type_id==$v->id  || old('product_type_id')==$v->id) ? 'selected' : '' }}>{{ ts('product_type_master.'.$v->id) }}</option>
                        @endforeach
                    </select>
                </div>
            </div>--}}
            <div class="form-item form-s1">
                <div class="form-label" required="">{{ ts('FILMTYPE') }}</div>
                <div class="form-input">
                    <select name="film_type_id" class="form-control">
                        <option value="">{{ ts('select').' '.ts('FILMTYPE') }}</option>
                        @foreach(\App\Models\FilmTypeMaster::get('id') as $v)
                            <option value="{{ $v->id }}" {{ ($data->film_type_id==$v->id  || old('film_type_id')==$v->id) ? 'selected' : '' }}>{{ ts('film_type_master.'.$v->id) }}</option>
                        @endforeach
                    </select>
                </div>
            </div>
            <div class="form-item form-s1">
                <div class="form-label" required="">{{ ts('FILMWIDTH') }}</div>
                <div class="form-input">
                    <select name="width" class="form-control">
                        @foreach([61,76,92,152] as $v)
                            <option value="{{ $v }}" {{ ($data->width==$v  || old('width')==$v) ? 'selected' : '' }}>{{ $v }}</option>
                        @endforeach
                    </select>
                </div>
            </div>
            <div class="form-item form-s1">
                <div class="form-label" required="">{{ ts('ROLLLENGTH') }}</div>
                <div class="form-input">
                    <input type="text" name="length" value="{{ old('length') ?: 1500 }}" class="form-control">
                </div>
            </div>
            <div class="mt-4">
                <button class="btn btn-info">{{ ts('store') }}</button>
            </div>
        </form>

    </div>


@endsection